<!doctype html>
<html lang="zh">
<head>

    <meta charset="UTF-8">

    {{--<title>@section('title') 国内第一大数字信号处理社区 - 高品质的 DSP 开发者社区@show - Powered by DSPSTACK.com</title>--}}

    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="keywords" content="算法栈,数字信号处理,,深度学习,机器学习,傅里叶变换,小波变换,滤波器,多尺度分析,滤波器设计,python,matlab,算法,神经网络,C,C++" />
    <meta name="author" content="DSPSTACK.COM" />
    <meta name="description" content="@section('description') 数字信号处理 是国内专注于 信号处理算法 中文开发者社区，致力于推动 国内算法领域的理论研究、应用实践，并提供各方交流的学习平台，同时为人工智能领域贡献一点力量，是国内最专业的 算法 社区。 @show" />

    <meta name="_token" content="{{ csrf_token() }}">

    <link rel="stylesheet" href="{{ cdn(elixir('assets/css/styles.css')) }}">

    <link rel="shortcut icon" href="{{ cdn('favicon1.png') }}"/>

    <script>
        Config = {
            'cdnDomain': '{{ get_cdn_domain() }}',
            'user_id': {{ $currentUser ? $currentUser->id : 0 }},
            'user_avatar': {!! $currentUser ? '"'.$currentUser->present()->gravatar() . '"' : '""' !!},
            'user_link': {!! $currentUser ? '"'. route('users.show', $currentUser->id) . '"' : '""' !!},
            'user_badge': '{{ $currentUser ? ($currentUser->present()->hasBadge() ? $currentUser->present()->badgeName() : '') : '' }}',
            'user_badge_link': "{{ $currentUser ? (route('roles.show', [$currentUser->present()->badgeID()])) : '' }}",
            'routes': {
                'notificationsCount' : '{{ route('notifications.count') }}',
                'upload_image' : '{{ route('upload_image') }}'
            },
            'token': '{{ csrf_token() }}',
            'environment': '{{ app()->environment() }}',
            'following_users': [],
            'qa_category_id': '{{ config('phphub.qa_category_id') }}'
        };

        var ShowCrxHint = '{{isset($show_crx_hint) ? $show_crx_hint : 'no'}}';
    </script>

    @yield('styles')

    <meta http-equiv="x-pjax-version" content="{{ elixir('assets/css/styles.css') }}">

</head>
<body id="body" class="{{ route_class() }}">

    <div id="wrap">

        @include('layouts.partials.nav')

            <div class="container main-container">
                <div class="alert alert-warning" style="margin-top: 40px;">
                    @if(isset($currentUser))
                        您的D币或积分不足，请到个人中心进行充值。
                    @else
                        您还未登录，请登录后再操作。
                    @endif
                    浏览器页面将在 <b id="loginTime"> 3 </b>秒后跳转......
                </div>
                <div class="form-group m-b-0" style="float: right">
                    <div class="input-group">
                        {{--<input type="password" class="form-control" placeholder="Enter Email">--}}
                        <a class="btn btn-warning no-pjax" href="@if(isset($currentUser)) {{ route('users.charge_dcoin', ['id' => $currentUser->id]) }} @else {{ route('auth.login') }} @endif">
                            点击立即跳转
                        </a>
                    </div>
                </div>
                {{--<div class="panel panel-color panel-danger">--}}

                    {{--<div class="panel-body">--}}
                        {{--<div class="text-center">--}}
          {{----}}
                        {{--</div>--}}
                    {{--</div>--}}
                {{--</div>--}}
            </div>
        @include('layouts.partials.footer')
        </div>
    <script src="{{ cdn(elixir('assets/js/scripts.js')) }}"></script>
    <script>
        $(function(){
            //循环倒计时，并跳转
            var url = "{{ route('users.charge_dcoin', ['id' => $currentUser->id]) }}";
            @if(!isset($currentUser))
                url = "{{ route('auth.login') }}";
            @endif
            var loginTime = parseInt($('#loginTime').text());

            var time = setInterval(function(){
                loginTime = loginTime-1;
                $('#loginTime').text(loginTime);
                if(loginTime==0){
                    clearInterval(time);
                    window.location.href=url;
                }
            },1000);
        })
    </script>

</body>

</html>